/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.guobo.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 区域人员中间表Entity
 * @author wudavid
 * @version 2017-03-31
 */
public class RegionUser extends DataEntity<RegionUser> {
	
	private static final long serialVersionUID = 1L;
	private String userid;		// 用户Id
	private String regionid;		// 区域id
	
	public RegionUser() {
		super();
	}

	public RegionUser(String id){
		super(id);
	}

	@Length(min=0, max=64, message="用户Id长度必须介于 0 和 64 之间")
	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}
	
	@Length(min=0, max=64, message="区域id长度必须介于 0 和 64 之间")
	public String getRegionid() {
		return regionid;
	}

	public void setRegionid(String regionid) {
		this.regionid = regionid;
	}
	
	@Override
	public boolean equals(Object obj) {	    
	    if(obj!=null){
	    	RegionUser other = (RegionUser)obj;
	    	if(userid.equals(other.getUserid()) && regionid.equals(other.getRegionid())){
	    		return true;
	    	}
	    }
	    return false;
	}
}